/**
 * Hunan Jiao Tai Technology Co., Ltd.
 * The code belongs to the company and can not be used in other ways
 * Created by the company's technical personnel.
 * Ownership is the responsibility of the company's technology department.
 **/

package com.shop.common.enums.pay;

import lombok.Getter;

import java.io.Serializable;

/**
 * 业务类型枚举类
 *
 **/
@Getter
public enum PayBusinessEnum implements Serializable {

    /**
     * 充值
     */
    RECHARGE("RECHARGE", "充值"),
    /**
     * 购买商品
     */
    STORE_ORDER("STORE_ORDER", "购买商品"),
    /**
     * 参与拼团
     */
    STORE_PINK_ORDER("STORE_PINK_ORDER", "参与拼团"),

    /**
     * 抢购拼团
     */
    STORE_SNAP_PINK_ORDER("STORE_SNAP_PINK_ORDER", "参与抢购拼团"),
    ;

    private String key;
    private String name;

    PayBusinessEnum(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public static PayBusinessEnum val(String key) {
        for (PayBusinessEnum enumObj : PayBusinessEnum.values()) {
            if(enumObj.key.equals(key)) {
                return enumObj;
            }
        }
        return null;
    }


}
